package fconfig

import (
	"encoding/json"
	"io/ioutil"
)

func Load(path string, t interface{}) error {
	data, err := ioutil.ReadFile(path)
	if err != nil {
		return err
	}

	err = json.Unmarshal(data, &t)
	if err != nil {
		return err
	}

	return nil
}
